<?php
/**
 * View parcial para campo form admin
 * @param campo
 * @param cabecalho
 * @param valor
 * @param required
 */
$campo = $this->campo;
$cabecalho = $this->cabecalho;
$valor = $this->valor;
$style = (isset($this->style)) ? $this->style : 'width: 50px;';
$hint = $this->hint;
?>
<label for="<?php echo $campo; ?>"><?php echo $cabecalho; ?></label>
<input class="text-input small-input {validate: {required: <?php echo ((isset($this->required) && $this->required == false) || (!empty($this->r) && (!empty($valor )))) ? 'false' : 'true'; ?>}}" type="file" id="<?php echo $campo; ?>" name="<?php echo $campo; ?>" />
<br />
<?php 
if(!empty($hint)){
?>
<small class="hint"><?php echo $hint; ?></small>
<?php 
}
?>
<br />
<?php
if (@!empty($valor)) {
?>
	<img src="<?php echo $this->baseUrl('arquivos/' . $valor); ?>" <?php echo 'style="' . $style . '"';?> />
	<label>
		<br />
		<input type="checkbox" name="apagar_<?php echo $campo; ?>" />
		Apagar <?php echo $cabecalho;?>
	</label>
<?php
}
?>